package com.ufgov.zc.client.common.converter;import java.text.SimpleDateFormat;import java.util.List;import java.util.Vector;import javax.swing.table.DefaultTableModel;import com.ufgov.zc.client.common.BillElementMeta;import com.ufgov.zc.client.common.LangTransMeta;import com.ufgov.zc.client.common.MyTableModel;import com.ufgov.zc.client.common.TzdSumElementMeta;import com.ufgov.zc.client.datacache.AsValDataCache;import com.ufgov.zc.client.util.CodeNameHandler;import com.ufgov.zc.common.cp.model.CpVoucher;import com.ufgov.zc.common.system.constants.CpElementConstants;import com.ufgov.zc.common.system.constants.DpElementConstants;public class CpVoucherToTableModelConverter {  private static SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");  public static Vector getCpVoucherColumnsForForListPage(BillElementMeta bem, boolean notdisplayBalCol, boolean isShowCheckin) {    Vector names = new Vector();    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_VOU_NO));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PROC_DATE));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CLEAR_DATE));    if (!notdisplayBalCol) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_DP_TOTAL_MONEY));      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_DP_BALANCE));      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_DP_PAY_MONEY));    }    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_ORG_MONEY));    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_BAL_MODE_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_BAL_MODE_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_CHECK_NO)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CHECK_NO));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_CONTRACT_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CONTRACT_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_INCEPTDOC_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_INCEPTDOC_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_SENDDOC_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_SENDDOC_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_OPERATION_TYPE_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_OPERATION_TYPE_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_ORG_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_ORG_NAME));    }    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CO_CODE));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CO_NAME));    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_ORIGIN_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_ORIGIN_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_PAYTYPE_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PAYTYPE_NAME));    }    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_B_ACC_CODE));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_B_ACC_NAME));    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_MANAGE_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_MANAGE_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_PROJECT_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PROJECT_CODE));      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PROJECT_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_FUND_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_FUND_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_PAYOUT_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PAYOUT_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_OUTLAY_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_OUTLAY_CODE));      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_OUTLAY_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR1)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_D_ATTR1_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR2)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_D_ATTR2_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR3)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_D_ATTR3_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR4)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_D_ATTR4_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR5)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_D_ATTR5_NAME));    }    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_REMARK));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_RECE_ACCNAME));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_RECE_BANKNODENAME));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_RECE_BANKACCCODE));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PAY_ACCNAME));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PAY_BANKNODENAME));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PAY_BANKACCCODE));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CP_ADJUST_CODE));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CLEAR_ACC_CODE));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CLEAR_ACC_NAME));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CLEAR_ACC_NO));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CLEAR_BANK_CODE));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CLEAR_BANK_NAME));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CLEAR_BANK_NO));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_BANK_DATE));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_DEAL_STATE));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_INPUTOR_NAME));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CDATE));    if (isShowCheckin) {      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_CHECK_DATE)) {        names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CHECK_DATE));      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_CHECK_INPUTOR)) {        names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CHECK_INPUTOR));      }    }    return names;  }  public static Vector getCpAvSummedColumnsForForListPage(BillElementMeta bem, TzdSumElementMeta sumBem, boolean notdisplayBalCol) {    Vector names = new Vector();    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_VOU_NO));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PROC_DATE));    if (!notdisplayBalCol) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_DP_TOTAL_MONEY));      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_DP_BALANCE));      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_DP_PAY_MONEY));    }    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_ORG_MONEY));    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_BAL_MODE_CODE) && sumBem.isSum(CpElementConstants.FIELD_NAME_BAL_MODE_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_BAL_MODE_NAME));    }    if (sumBem.isSum(CpElementConstants.FIELD_NAME_CHECK_NO)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CHECK_NO));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_INCEPTDOC_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_INCEPTDOC_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_SENDDOC_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_SENDDOC_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_OPERATION_TYPE_CODE) && sumBem.isSum(CpElementConstants.FIELD_NAME_OPERATION_TYPE_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_OPERATION_TYPE_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_ORG_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_ORG_NAME));    }    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CO_CODE));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CO_NAME));    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_ORIGIN_CODE) && sumBem.isSum(CpElementConstants.FIELD_NAME_ORIGIN_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_ORIGIN_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_PAYTYPE_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PAYTYPE_NAME));    }    if (sumBem.isSum(CpElementConstants.FIELD_NAME_B_ACC_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_B_ACC_CODE));      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_B_ACC_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_MANAGE_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_MANAGE_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_PROJECT_CODE) && sumBem.isSum(CpElementConstants.FIELD_NAME_PROJECT_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PROJECT_CODE));      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PROJECT_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_FUND_CODE) && sumBem.isSum(CpElementConstants.FIELD_NAME_FUND_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_FUND_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_PAYOUT_CODE) && sumBem.isSum(CpElementConstants.FIELD_NAME_PAYOUT_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PAYOUT_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_OUTLAY_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_OUTLAY_CODE));      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_OUTLAY_NAME));    }    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_REMARK));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_RECE_ACCNAME));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_RECE_BANKNODENAME));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_RECE_BANKACCCODE));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PAY_ACCNAME));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PAY_BANKNODENAME));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PAY_BANKACCCODE));    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR1) && sumBem.isSum(CpElementConstants.FIELD_NAME_D_ATTR1)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_D_ATTR1_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR2) && sumBem.isSum(CpElementConstants.FIELD_NAME_D_ATTR2)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_D_ATTR2_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR3) && sumBem.isSum(CpElementConstants.FIELD_NAME_D_ATTR3)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_D_ATTR3_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR4) && sumBem.isSum(CpElementConstants.FIELD_NAME_D_ATTR4)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_D_ATTR4_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR5) && sumBem.isSum(CpElementConstants.FIELD_NAME_D_ATTR5)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_D_ATTR5_NAME));    }    return names;  }  public static Vector getCpVoucherRecordsForForListPage(List cpVoucherList, BillElementMeta bem,  boolean notdisplayBalCol, boolean isShowCheckin) {    CodeNameHandler.handleNames(cpVoucherList);    Vector values = new Vector();    for (int i = 0; i < cpVoucherList.size(); i++) {      Vector eachRowData = new Vector();      CpVoucher cpVoucher = (CpVoucher) cpVoucherList.get(i);      eachRowData.add(cpVoucher.getCpVouNo());      eachRowData.add(format.format(cpVoucher.getProcdate()));      eachRowData.add(cpVoucher.getClearDate() == null ? null : format.format(cpVoucher.getClearDate()));      if (!notdisplayBalCol) {        eachRowData.add(cpVoucher.getDpMoney());        eachRowData.add(cpVoucher.getDpBalance());        eachRowData.add(cpVoucher.getDpPaySum());      }      eachRowData.add(cpVoucher.getOrgMoney());      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_BAL_MODE_CODE)) {        eachRowData.add(cpVoucher.getBalModeName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_CHECK_NO)) {        eachRowData.add(cpVoucher.getCheckNo());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_CONTRACT_CODE)) {        eachRowData.add(cpVoucher.getContractCode());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_INCEPTDOC_CODE)) {        eachRowData.add(cpVoucher.getInceptDocName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_SENDDOC_CODE)) {        eachRowData.add(cpVoucher.getSendDocName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_OPERATION_TYPE_CODE)) {        eachRowData.add(cpVoucher.getOperationTypeName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_ORG_CODE)) {        eachRowData.add(cpVoucher.getOrgName());      }      eachRowData.add(cpVoucher.getCoCode());      eachRowData.add(cpVoucher.getCoName());      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_ORIGIN_CODE)) {        eachRowData.add(cpVoucher.getOriginName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_PAYTYPE_CODE)) {        eachRowData.add(cpVoucher.getPaytypeName());      }      eachRowData.add(cpVoucher.getBaccCode());      eachRowData.add(cpVoucher.getBaccName());      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_MANAGE_CODE)) {        eachRowData.add(cpVoucher.getManageName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_PROJECT_CODE)) {        eachRowData.add(cpVoucher.getProjectCode());        eachRowData.add(cpVoucher.getProjectName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_FUND_CODE)) {        eachRowData.add(cpVoucher.getFundName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_PAYOUT_CODE)) {        eachRowData.add(cpVoucher.getPayoutName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_OUTLAY_CODE)) {        eachRowData.add(cpVoucher.getOutlayCode());        eachRowData.add(cpVoucher.getOutlayName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR1)) {        eachRowData.add(cpVoucher.getDattr1Name());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR2)) {        eachRowData.add(cpVoucher.getDattr2Name());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR3)) {        eachRowData.add(cpVoucher.getDattr3Name());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR4)) {        eachRowData.add(cpVoucher.getDattr4Name());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR5)) {        eachRowData.add(cpVoucher.getDattr5Name());      }      eachRowData.add(cpVoucher.getRemark());      eachRowData.add(cpVoucher.getReceAccName());      eachRowData.add(cpVoucher.getReceBankNodeName());      eachRowData.add(cpVoucher.getReceBankAccCode());      eachRowData.add(cpVoucher.getPayAccName());      eachRowData.add(cpVoucher.getPayBankNodeName());      eachRowData.add(cpVoucher.getPayBankAccCode());      String adjustCode = AsValDataCache.getName("VS_CP_ADJUST", cpVoucher.getCpAdjustCode());      eachRowData.add(adjustCode);      eachRowData.add(cpVoucher.getClearAccCode());      eachRowData.add(cpVoucher.getClearAccName());      eachRowData.add(cpVoucher.getClearAccNo());      eachRowData.add(cpVoucher.getClearBankCode());      eachRowData.add(cpVoucher.getClearBankName());      eachRowData.add(cpVoucher.getClearBankNo());      eachRowData.add(cpVoucher.getBankDate());      String dealState = AsValDataCache.getName("VS_CP_DEAL_STATE", cpVoucher.getDealState());      eachRowData.add(dealState);      eachRowData.add(cpVoucher.getInputorName());      eachRowData.add(cpVoucher.getCdate());      if (isShowCheckin) {        if (bem.isElementInclude(CpElementConstants.FIELD_NAME_CHECK_DATE)) {          eachRowData.add(cpVoucher.getCheckDate());        }        if (bem.isElementInclude(CpElementConstants.FIELD_NAME_CHECK_INPUTOR)) {          eachRowData.add(cpVoucher.getCheckInputor());        }      }      values.add(eachRowData);    }    return values;  }  public static Vector getCpAvSummedRecordsForForListPage(List cpVoucherList, BillElementMeta bem,  TzdSumElementMeta sumBem, boolean notdisplayBalCol) {    CodeNameHandler.handleNames(cpVoucherList);    Vector values = new Vector();    for (int i = 0; i < cpVoucherList.size(); i++) {      Vector eachRowData = new Vector();      CpVoucher cpVoucher = (CpVoucher) cpVoucherList.get(i);      eachRowData.add(cpVoucher.getCpVouNo());      eachRowData.add(format.format(cpVoucher.getProcdate()));      if (!notdisplayBalCol) {        eachRowData.add(cpVoucher.getDpMoney());        eachRowData.add(cpVoucher.getDpBalance());        eachRowData.add(cpVoucher.getDpPaySum());      }      eachRowData.add(cpVoucher.getOrgMoney());      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_BAL_MODE_CODE) && sumBem.isSum(CpElementConstants.FIELD_NAME_BAL_MODE_CODE)) {        eachRowData.add(cpVoucher.getBalModeName());      }      if (sumBem.isSum(CpElementConstants.FIELD_NAME_CHECK_NO)) {        eachRowData.add(cpVoucher.getCheckNo());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_INCEPTDOC_CODE)) {        eachRowData.add(cpVoucher.getInceptDocName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_SENDDOC_CODE)) {        eachRowData.add(cpVoucher.getSendDocName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_OPERATION_TYPE_CODE) && sumBem.isSum(CpElementConstants.FIELD_NAME_OPERATION_TYPE_CODE)) {        eachRowData.add(cpVoucher.getOperationTypeName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_ORG_CODE)) {        eachRowData.add(cpVoucher.getOrgName());      }      eachRowData.add(cpVoucher.getCoCode());      eachRowData.add(cpVoucher.getCoName());      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_ORIGIN_CODE) && sumBem.isSum(CpElementConstants.FIELD_NAME_ORIGIN_CODE)) {        eachRowData.add(cpVoucher.getOriginName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_PAYTYPE_CODE)) {        eachRowData.add(cpVoucher.getPaytypeName());      }      if (sumBem.isSum(CpElementConstants.FIELD_NAME_B_ACC_CODE)) {        eachRowData.add(cpVoucher.getBaccCode());        eachRowData.add(cpVoucher.getBaccName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_MANAGE_CODE)) {        eachRowData.add(cpVoucher.getManageName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_PROJECT_CODE) && sumBem.isSum(CpElementConstants.FIELD_NAME_PROJECT_CODE)) {        eachRowData.add(cpVoucher.getProjectCode());        eachRowData.add(cpVoucher.getProjectName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_FUND_CODE) && sumBem.isSum(CpElementConstants.FIELD_NAME_FUND_CODE)) {        eachRowData.add(cpVoucher.getFundName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_PAYOUT_CODE) && sumBem.isSum(CpElementConstants.FIELD_NAME_PAYOUT_CODE)) {        eachRowData.add(cpVoucher.getPayoutName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_OUTLAY_CODE)) {        eachRowData.add(cpVoucher.getOutlayCode());        eachRowData.add(cpVoucher.getOutlayName());      }      eachRowData.add(cpVoucher.getRemark());      eachRowData.add(cpVoucher.getReceAccName());      eachRowData.add(cpVoucher.getReceBankNodeName());      eachRowData.add(cpVoucher.getReceBankAccCode());      eachRowData.add(cpVoucher.getPayAccName());      eachRowData.add(cpVoucher.getPayBankNodeName());      eachRowData.add(cpVoucher.getPayBankAccCode());      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR1) && sumBem.isSum(CpElementConstants.FIELD_NAME_D_ATTR1)) {        eachRowData.add(cpVoucher.getDattr1Name());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR2) && sumBem.isSum(CpElementConstants.FIELD_NAME_D_ATTR2)) {        eachRowData.add(cpVoucher.getDattr2Name());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR3) && sumBem.isSum(CpElementConstants.FIELD_NAME_D_ATTR3)) {        eachRowData.add(cpVoucher.getDattr3Name());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR4) && sumBem.isSum(CpElementConstants.FIELD_NAME_D_ATTR4)) {        eachRowData.add(cpVoucher.getDattr4Name());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR5) && sumBem.isSum(CpElementConstants.FIELD_NAME_D_ATTR5)) {        eachRowData.add(cpVoucher.getDattr5Name());      }      values.add(eachRowData);    }    return values;  }  public static Vector getCpVoucherSumRecordsForForListPage(List cpVoucherList, BillElementMeta bem,  TzdSumElementMeta sumBem, boolean notdisplayBalCol, boolean notdisplayBankInfo) {    CodeNameHandler.handleNames(cpVoucherList);    Vector values = new Vector();    for (int i = 0; i < cpVoucherList.size(); i++) {      Vector eachRowData = new Vector();      CpVoucher cpVoucher = (CpVoucher) cpVoucherList.get(i);      eachRowData.add(cpVoucher.getCpVouNo());      eachRowData.add(format.format(cpVoucher.getProcdate()));      if (!notdisplayBalCol) {        eachRowData.add(cpVoucher.getDpMoney());        eachRowData.add(cpVoucher.getDpBalance());        eachRowData.add(cpVoucher.getDpPaySum());      }      eachRowData.add(cpVoucher.getOrgMoney());      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_BAL_MODE_CODE) && sumBem.isSum(CpElementConstants.FIELD_NAME_BAL_MODE_CODE)) {        eachRowData.add(cpVoucher.getBalModeName());      }      if (sumBem.isSum(CpElementConstants.FIELD_NAME_CHECK_NO)) {        eachRowData.add(cpVoucher.getCheckNo());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_INCEPTDOC_CODE)) {        eachRowData.add(cpVoucher.getInceptDocName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_SENDDOC_CODE)) {        eachRowData.add(cpVoucher.getSendDocName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_OPERATION_TYPE_CODE) && sumBem.isSum(CpElementConstants.FIELD_NAME_OPERATION_TYPE_CODE)) {        eachRowData.add(cpVoucher.getOperationTypeName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_ORG_CODE)) {        eachRowData.add(cpVoucher.getOrgName());      }      eachRowData.add(cpVoucher.getCoCode());      eachRowData.add(cpVoucher.getCoName());      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_ORIGIN_CODE) && sumBem.isSum(CpElementConstants.FIELD_NAME_ORIGIN_CODE)) {        eachRowData.add(cpVoucher.getOriginName());      }      eachRowData.add(cpVoucher.getPaytypeName());      if (sumBem.isSum(CpElementConstants.FIELD_NAME_B_ACC_CODE)) {        eachRowData.add(cpVoucher.getBaccCode());        eachRowData.add(cpVoucher.getBaccName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_MANAGE_CODE)) {        eachRowData.add(cpVoucher.getManageName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_PROJECT_CODE) && sumBem.isSum(CpElementConstants.FIELD_NAME_PROJECT_CODE)) {        eachRowData.add(cpVoucher.getProjectCode());        eachRowData.add(cpVoucher.getProjectName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_FUND_CODE) && sumBem.isSum(CpElementConstants.FIELD_NAME_FUND_CODE)) {        eachRowData.add(cpVoucher.getFundName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_PAYOUT_CODE) && sumBem.isSum(CpElementConstants.FIELD_NAME_PAYOUT_CODE)) {        eachRowData.add(cpVoucher.getPayoutName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_OUTLAY_CODE)) {        eachRowData.add(cpVoucher.getOutlayCode());        eachRowData.add(cpVoucher.getOutlayName());      }      eachRowData.add(cpVoucher.getRemark());      if (notdisplayBankInfo) {        eachRowData.add(cpVoucher.getReceAccName());        eachRowData.add(cpVoucher.getReceBankNodeName());        eachRowData.add(cpVoucher.getReceBankAccCode());        eachRowData.add(cpVoucher.getPayAccName());        eachRowData.add(cpVoucher.getPayBankNodeName());        eachRowData.add(cpVoucher.getPayBankAccCode());      }      if (sumBem.isSum(CpElementConstants.FIELD_NAME_CLEAR_ACCOUNT)) {        eachRowData.add(cpVoucher.getClearAccCode());        eachRowData.add(cpVoucher.getClearAccName());        eachRowData.add(cpVoucher.getClearAccNo());        eachRowData.add(cpVoucher.getClearBankCode());        eachRowData.add(cpVoucher.getClearBankName());        eachRowData.add(cpVoucher.getClearBankNo());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR1) && sumBem.isSum(CpElementConstants.FIELD_NAME_D_ATTR1)) {        eachRowData.add(cpVoucher.getDattr1Name());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR2) && sumBem.isSum(CpElementConstants.FIELD_NAME_D_ATTR2)) {        eachRowData.add(cpVoucher.getDattr2Name());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR3) && sumBem.isSum(CpElementConstants.FIELD_NAME_D_ATTR3)) {        eachRowData.add(cpVoucher.getDattr3Name());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR4) && sumBem.isSum(CpElementConstants.FIELD_NAME_D_ATTR4)) {        eachRowData.add(cpVoucher.getDattr4Name());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR5) && sumBem.isSum(CpElementConstants.FIELD_NAME_D_ATTR5)) {        eachRowData.add(cpVoucher.getDattr5Name());      }      eachRowData.add(cpVoucher.getPrintTimes());      values.add(eachRowData);    }    return values;  }  public static Vector getCpVoucherUnSummedRecordsForForListPage(List cpVoucherList, BillElementMeta bem,  boolean notdisplayBalCol) {    CodeNameHandler.handleNames(cpVoucherList);    Vector values = new Vector();    for (int i = 0; i < cpVoucherList.size(); i++) {      Vector eachRowData = new Vector();      CpVoucher cpVoucher = (CpVoucher) cpVoucherList.get(i);      eachRowData.add(cpVoucher.getCpVouNo());      eachRowData.add(format.format(cpVoucher.getProcdate()));      if (!notdisplayBalCol) {        eachRowData.add(cpVoucher.getDpMoney());        eachRowData.add(cpVoucher.getDpBalance());        eachRowData.add(cpVoucher.getDpPaySum());      }      eachRowData.add(cpVoucher.getOrgMoney());      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_BAL_MODE_CODE)) {        eachRowData.add(cpVoucher.getBalModeName());      }      eachRowData.add(cpVoucher.getCheckNo());      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_INCEPTDOC_CODE)) {        eachRowData.add(cpVoucher.getInceptDocName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_SENDDOC_CODE)) {        eachRowData.add(cpVoucher.getSendDocName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_OPERATION_TYPE_CODE)) {        eachRowData.add(cpVoucher.getOperationTypeName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_ORG_CODE)) {        eachRowData.add(cpVoucher.getOrgName());      }      eachRowData.add(cpVoucher.getCoCode());      eachRowData.add(cpVoucher.getCoName());      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_ORIGIN_CODE)) {        eachRowData.add(cpVoucher.getOriginName());      }      eachRowData.add(cpVoucher.getPaytypeName());      eachRowData.add(cpVoucher.getBaccCode());      eachRowData.add(cpVoucher.getBaccName());      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_MANAGE_CODE)) {        eachRowData.add(cpVoucher.getManageName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_PROJECT_CODE)) {        eachRowData.add(cpVoucher.getProjectCode());        eachRowData.add(cpVoucher.getProjectName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_FUND_CODE)) {        eachRowData.add(cpVoucher.getFundName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_PAYOUT_CODE)) {        eachRowData.add(cpVoucher.getPayoutName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_OUTLAY_CODE)) {        eachRowData.add(cpVoucher.getOutlayCode());        eachRowData.add(cpVoucher.getOutlayName());      }      eachRowData.add(cpVoucher.getRemark());      eachRowData.add(cpVoucher.getReceAccName());      eachRowData.add(cpVoucher.getReceBankNodeName());      eachRowData.add(cpVoucher.getReceBankAccCode());      eachRowData.add(cpVoucher.getPayAccName());      eachRowData.add(cpVoucher.getPayBankNodeName());      eachRowData.add(cpVoucher.getPayBankAccCode());      eachRowData.add(cpVoucher.getClearAccCode());      eachRowData.add(cpVoucher.getClearAccName());      eachRowData.add(cpVoucher.getClearAccNo());      eachRowData.add(cpVoucher.getClearBankCode());      eachRowData.add(cpVoucher.getClearBankName());      eachRowData.add(cpVoucher.getClearBankNo());      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR1)) {        eachRowData.add(cpVoucher.getDattr1Name());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR2)) {        eachRowData.add(cpVoucher.getDattr2Name());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR3)) {        eachRowData.add(cpVoucher.getDattr3Name());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR4)) {        eachRowData.add(cpVoucher.getDattr4Name());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR5)) {        eachRowData.add(cpVoucher.getDattr5Name());      }      values.add(eachRowData);    }    return values;  }  public static Vector getCpVoucherSumColumnsForForListPage(BillElementMeta bem, TzdSumElementMeta sumBem, boolean notdisplayBalCol,    boolean notdisplayBankInfo) {    Vector names = new Vector();    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_VOU_NO));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PROC_DATE));    if (!notdisplayBalCol) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_DP_TOTAL_MONEY));      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_DP_BALANCE));      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_DP_PAY_MONEY));    }    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_ORG_MONEY));    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_BAL_MODE_CODE) && sumBem.isSum(CpElementConstants.FIELD_NAME_BAL_MODE_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_BAL_MODE_NAME));    }    if (sumBem.isSum(CpElementConstants.FIELD_NAME_CHECK_NO)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CHECK_NO));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_INCEPTDOC_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_INCEPTDOC_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_SENDDOC_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_SENDDOC_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_OPERATION_TYPE_CODE) && sumBem.isSum(CpElementConstants.FIELD_NAME_OPERATION_TYPE_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_OPERATION_TYPE_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_ORG_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_ORG_NAME));    }    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CO_CODE));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CO_NAME));    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_ORIGIN_CODE) && sumBem.isSum(CpElementConstants.FIELD_NAME_ORIGIN_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_ORIGIN_NAME));    }    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PAYTYPE_NAME));    if (sumBem.isSum(CpElementConstants.FIELD_NAME_B_ACC_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_B_ACC_CODE));      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_B_ACC_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_MANAGE_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_MANAGE_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_PROJECT_CODE) && sumBem.isSum(CpElementConstants.FIELD_NAME_PROJECT_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PROJECT_CODE));      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PROJECT_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_FUND_CODE) && sumBem.isSum(CpElementConstants.FIELD_NAME_FUND_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_FUND_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_PAYOUT_CODE) && sumBem.isSum(CpElementConstants.FIELD_NAME_PAYOUT_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PAYOUT_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_OUTLAY_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_OUTLAY_CODE));      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_OUTLAY_NAME));    }    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_REMARK));    if (notdisplayBankInfo) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_RECE_ACCNAME));      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_RECE_BANKNODENAME));      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_RECE_BANKACCCODE));      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PAY_ACCNAME));      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PAY_BANKNODENAME));      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PAY_BANKACCCODE));    }    if (sumBem.isSum(CpElementConstants.FIELD_NAME_CLEAR_ACCOUNT)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CLEAR_ACC_CODE));      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CLEAR_ACC_NAME));      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CLEAR_ACC_NO));      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CLEAR_BANK_CODE));      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CLEAR_BANK_NAME));      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CLEAR_BANK_NO));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR1) && sumBem.isSum(CpElementConstants.FIELD_NAME_D_ATTR1)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_D_ATTR1_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR2) && sumBem.isSum(CpElementConstants.FIELD_NAME_D_ATTR2)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_D_ATTR2_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR3) && sumBem.isSum(CpElementConstants.FIELD_NAME_D_ATTR3)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_D_ATTR3_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR4) && sumBem.isSum(CpElementConstants.FIELD_NAME_D_ATTR4)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_D_ATTR4_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR5) && sumBem.isSum(CpElementConstants.FIELD_NAME_D_ATTR5)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_D_ATTR5_NAME));    }    names.add("打印次数");    return names;  }  public static Vector getCpVoucherUnSummedColumnsForForListPage(BillElementMeta bem, boolean notdisplayBalCol) {    Vector names = new Vector();    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_VOU_NO));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PROC_DATE));    if (!notdisplayBalCol) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_DP_TOTAL_MONEY));      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_DP_BALANCE));      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_DP_PAY_MONEY));    }    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_ORG_MONEY));    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_BAL_MODE_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_BAL_MODE_NAME));    }    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CHECK_NO));    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_INCEPTDOC_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_INCEPTDOC_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_SENDDOC_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_SENDDOC_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_OPERATION_TYPE_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_OPERATION_TYPE_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_ORG_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_ORG_NAME));    }    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CO_CODE));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CO_NAME));    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_ORIGIN_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_ORIGIN_NAME));    }    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PAYTYPE_NAME));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_B_ACC_CODE));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_B_ACC_NAME));    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_MANAGE_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_MANAGE_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_PROJECT_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PROJECT_CODE));      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PROJECT_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_FUND_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_FUND_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_PAYOUT_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PAYOUT_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_OUTLAY_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_OUTLAY_CODE));      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_OUTLAY_NAME));    }    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_REMARK));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_RECE_ACCNAME));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_RECE_BANKNODENAME));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_RECE_BANKACCCODE));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PAY_ACCNAME));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PAY_BANKNODENAME));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PAY_BANKACCCODE));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CLEAR_ACC_CODE));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CLEAR_ACC_NAME));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CLEAR_ACC_NO));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CLEAR_BANK_CODE));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CLEAR_BANK_NAME));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CLEAR_BANK_NO));    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR1)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_D_ATTR1_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR2)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_D_ATTR2_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR3)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_D_ATTR3_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR4)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_D_ATTR4_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR5)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_D_ATTR5_NAME));    }    return names;  }  public static MyTableModel convertCpVoucherToTableModelForRefund(List cpVoucherList, BillElementMeta bem,  boolean notdisplayBalCol) {    CodeNameHandler.handleNames(cpVoucherList);    MyTableModel cpVoucherTableModel = null;    Vector names = getCpVoucherColumnsForRefund(bem, notdisplayBalCol, false);    Vector values = getCpVoucherRecordsForRefund(cpVoucherList, bem, notdisplayBalCol, false);    cpVoucherTableModel = new MyTableModel(values, names) {      public Class getColumnClass(int column) {        if ((column >= 0) && (column < getColumnCount()) && this.getRowCount() > 0) {          for (int row = 0; row < this.getRowCount(); row++) {            if (getValueAt(row, column) != null) {              return getValueAt(row, column).getClass();            }          }        }        return Object.class;      }      @Override      public boolean isCellEditable(int row, int colum) {        return false;      }    };    cpVoucherTableModel.setList(cpVoucherList);    return cpVoucherTableModel;  }  public static Vector getCpVoucherColumnsForRefund(BillElementMeta bem, boolean notdisplayBalCol, boolean isShowCheckin) {    Vector names = new Vector();    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_VOU_NO));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PROC_DATE));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CLEAR_DATE));    if (!notdisplayBalCol) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_DP_TOTAL_MONEY));      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_DP_BALANCE));      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_DP_PAY_MONEY));    }    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_ORG_MONEY_REFUND));    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_BAL_MODE_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_BAL_MODE_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_CHECK_NO)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CHECK_NO));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_CONTRACT_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CONTRACT_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_INCEPTDOC_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_INCEPTDOC_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_SENDDOC_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_SENDDOC_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_OPERATION_TYPE_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_OPERATION_TYPE_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_ORG_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_ORG_NAME));    }    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CO_CODE));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CO_NAME));    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_ORIGIN_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_ORIGIN_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_PAYTYPE_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PAYTYPE_NAME));    }    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_B_ACC_CODE));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_B_ACC_NAME));    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_MANAGE_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_MANAGE_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_PROJECT_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PROJECT_CODE));      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PROJECT_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_FUND_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_FUND_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_PAYOUT_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PAYOUT_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_OUTLAY_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_OUTLAY_CODE));      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_OUTLAY_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR1)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_D_ATTR1_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR2)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_D_ATTR2_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR3)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_D_ATTR3_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR4)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_D_ATTR4_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR5)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_D_ATTR5_NAME));    }    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_REMARK));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_RECE_ACCNAME));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_RECE_BANKNODENAME));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_RECE_BANKACCCODE));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PAY_ACCNAME));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PAY_BANKNODENAME));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PAY_BANKACCCODE));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CP_ADJUST_CODE));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CLEAR_ACC_CODE));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CLEAR_ACC_NAME));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CLEAR_ACC_NO));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CLEAR_BANK_CODE));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CLEAR_BANK_NAME));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CLEAR_BANK_NO));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_BANK_DATE));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_DEAL_STATE));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_INPUTOR_NAME));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CDATE));    if (isShowCheckin) {      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_CHECK_DATE)) {        names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CHECK_DATE));      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_CHECK_INPUTOR)) {        names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CHECK_INPUTOR));      }    }    return names;  }  public static Vector getCpVoucherRecordsForRefund(List cpVoucherList, BillElementMeta bem,  boolean notdisplayBalCol, boolean isShowCheckin) {    CodeNameHandler.handleNames(cpVoucherList);    Vector values = new Vector();    for (int i = 0; i < cpVoucherList.size(); i++) {      Vector eachRowData = new Vector();      CpVoucher cpVoucher = (CpVoucher) cpVoucherList.get(i);      eachRowData.add(cpVoucher.getCpVouNo());      eachRowData.add(format.format(cpVoucher.getProcdate()));      eachRowData.add(cpVoucher.getClearDate() == null ? null : format.format(cpVoucher.getClearDate()));      if (!notdisplayBalCol) {        eachRowData.add(cpVoucher.getDpMoney());        eachRowData.add(cpVoucher.getDpBalance());        eachRowData.add(cpVoucher.getDpPaySum());      }      eachRowData.add(cpVoucher.getOrgMoney());      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_BAL_MODE_CODE)) {        eachRowData.add(cpVoucher.getBalModeName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_CHECK_NO)) {        eachRowData.add(cpVoucher.getCheckNo());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_CONTRACT_CODE)) {        eachRowData.add(cpVoucher.getContractCode());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_INCEPTDOC_CODE)) {        eachRowData.add(cpVoucher.getInceptDocName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_SENDDOC_CODE)) {        eachRowData.add(cpVoucher.getSendDocName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_OPERATION_TYPE_CODE)) {        eachRowData.add(cpVoucher.getOperationTypeName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_ORG_CODE)) {        eachRowData.add(cpVoucher.getOrgName());      }      eachRowData.add(cpVoucher.getCoCode());      eachRowData.add(cpVoucher.getCoName());      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_ORIGIN_CODE)) {        eachRowData.add(cpVoucher.getOriginName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_PAYTYPE_CODE)) {        eachRowData.add(cpVoucher.getPaytypeName());      }      eachRowData.add(cpVoucher.getBaccCode());      eachRowData.add(cpVoucher.getBaccName());      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_MANAGE_CODE)) {        eachRowData.add(cpVoucher.getManageName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_PROJECT_CODE)) {        eachRowData.add(cpVoucher.getProjectCode());        eachRowData.add(cpVoucher.getProjectName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_FUND_CODE)) {        eachRowData.add(cpVoucher.getFundName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_PAYOUT_CODE)) {        eachRowData.add(cpVoucher.getPayoutName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_OUTLAY_CODE)) {        eachRowData.add(cpVoucher.getOutlayCode());        eachRowData.add(cpVoucher.getOutlayName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR1)) {        eachRowData.add(cpVoucher.getDattr1Name());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR2)) {        eachRowData.add(cpVoucher.getDattr2Name());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR3)) {        eachRowData.add(cpVoucher.getDattr3Name());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR4)) {        eachRowData.add(cpVoucher.getDattr4Name());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR5)) {        eachRowData.add(cpVoucher.getDattr5Name());      }      eachRowData.add(cpVoucher.getRemark());      eachRowData.add(cpVoucher.getReceAccName());      eachRowData.add(cpVoucher.getReceBankNodeName());      eachRowData.add(cpVoucher.getReceBankAccCode());      eachRowData.add(cpVoucher.getPayAccName());      eachRowData.add(cpVoucher.getPayBankNodeName());      eachRowData.add(cpVoucher.getPayBankAccCode());      String adjustCode = AsValDataCache.getName("VS_CP_ADJUST", cpVoucher.getCpAdjustCode());      eachRowData.add(adjustCode);      eachRowData.add(cpVoucher.getClearAccCode());      eachRowData.add(cpVoucher.getClearAccName());      eachRowData.add(cpVoucher.getClearAccNo());      eachRowData.add(cpVoucher.getClearBankCode());      eachRowData.add(cpVoucher.getClearBankName());      eachRowData.add(cpVoucher.getClearBankNo());      eachRowData.add(cpVoucher.getBankDate());      String dealState = AsValDataCache.getName("VS_CP_DEAL_STATE", cpVoucher.getDealState());      eachRowData.add(dealState);      eachRowData.add(cpVoucher.getInputorName());      eachRowData.add(cpVoucher.getCdate());      if (isShowCheckin) {        if (bem.isElementInclude(CpElementConstants.FIELD_NAME_CHECK_DATE)) {          eachRowData.add(cpVoucher.getCheckDate());        }        if (bem.isElementInclude(CpElementConstants.FIELD_NAME_CHECK_INPUTOR)) {          eachRowData.add(cpVoucher.getCheckInputor());        }      }      values.add(eachRowData);    }    return values;  }  public static MyTableModel convertCpVoucherToTableModelForRefund2(List cpVoucherList, BillElementMeta bem,  boolean notdisplayBalCol) {    CodeNameHandler.handleNames(cpVoucherList);    MyTableModel cpVoucherTableModel = null;    Vector names1 = new Vector();    names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_VOU_NO));    names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PROC_DATE));    names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CLEAR_DATE));    if (!notdisplayBalCol) {      names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_DP_TOTAL_MONEY));      names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_DP_BALANCE));      names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_DP_PAY_MONEY));    }    names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CUR_MONEY));    names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_AVAILABLE_REFUND));    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_BAL_MODE_CODE)) {      names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_BAL_MODE_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_CHECK_NO)) {      names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CHECK_NO));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_CONTRACT_CODE)) {      names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CONTRACT_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_INCEPTDOC_CODE)) {      names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_INCEPTDOC_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_SENDDOC_CODE)) {      names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_SENDDOC_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_OPERATION_TYPE_CODE)) {      names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_OPERATION_TYPE_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_ORG_CODE)) {      names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_ORG_NAME));    }    names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CO_CODE));    names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CO_NAME));    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_ORIGIN_CODE)) {      names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_ORIGIN_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_PAYTYPE_CODE)) {      names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PAYTYPE_NAME));    }    names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_B_ACC_CODE));    names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_B_ACC_NAME));    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_MANAGE_CODE)) {      names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_MANAGE_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_PROJECT_CODE)) {      names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PROJECT_CODE));      names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PROJECT_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_FUND_CODE)) {      names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_FUND_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_PAYOUT_CODE)) {      names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PAYOUT_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_OUTLAY_CODE)) {      names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_OUTLAY_CODE));      names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_OUTLAY_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR1)) {      names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_D_ATTR1_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR2)) {      names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_D_ATTR2_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR3)) {      names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_D_ATTR3_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR4)) {      names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_D_ATTR4_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR5)) {      names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_D_ATTR5_NAME));    }    names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_REMARK));    names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_RECE_ACCNAME));    names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_RECE_BANKNODENAME));    names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_RECE_BANKACCCODE));    names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PAY_ACCNAME));    names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PAY_BANKNODENAME));    names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PAY_BANKACCCODE));    names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CP_ADJUST_CODE));    names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CLEAR_ACC_CODE));    names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CLEAR_ACC_NAME));    names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CLEAR_ACC_NO));    names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CLEAR_BANK_CODE));    names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CLEAR_BANK_NAME));    names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CLEAR_BANK_NO));    names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_BANK_DATE));    names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_DEAL_STATE));    names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_INPUTOR_NAME));    names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CDATE));    if (false) {      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_CHECK_DATE)) {        names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CHECK_DATE));      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_CHECK_INPUTOR)) {        names1.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CHECK_INPUTOR));      }    }    Vector names = names1;    CodeNameHandler.handleNames(cpVoucherList);    Vector values1 = new Vector();    for (int i = 0; i < cpVoucherList.size(); i++) {      Vector eachRowData = new Vector();      CpVoucher cpVoucher = (CpVoucher) cpVoucherList.get(i);      eachRowData.add(cpVoucher.getCpVouNo());      eachRowData.add(format.format(cpVoucher.getProcdate()));      eachRowData.add(cpVoucher.getClearDate() == null ? null : format.format(cpVoucher.getClearDate()));      if (!notdisplayBalCol) {        eachRowData.add(cpVoucher.getDpMoney());        eachRowData.add(cpVoucher.getDpBalance());        eachRowData.add(cpVoucher.getDpPaySum());      }      eachRowData.add(cpVoucher.getCurMoney());      eachRowData.add(cpVoucher.getAvailableRefund());      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_BAL_MODE_CODE)) {        eachRowData.add(cpVoucher.getBalModeName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_CHECK_NO)) {        eachRowData.add(cpVoucher.getCheckNo());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_CONTRACT_CODE)) {        eachRowData.add(cpVoucher.getContractCode());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_INCEPTDOC_CODE)) {        eachRowData.add(cpVoucher.getInceptDocName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_SENDDOC_CODE)) {        eachRowData.add(cpVoucher.getSendDocName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_OPERATION_TYPE_CODE)) {        eachRowData.add(cpVoucher.getOperationTypeName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_ORG_CODE)) {        eachRowData.add(cpVoucher.getOrgName());      }      eachRowData.add(cpVoucher.getCoCode());      eachRowData.add(cpVoucher.getCoName());      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_ORIGIN_CODE)) {        eachRowData.add(cpVoucher.getOriginName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_PAYTYPE_CODE)) {        eachRowData.add(cpVoucher.getPaytypeName());      }      eachRowData.add(cpVoucher.getBaccCode());      eachRowData.add(cpVoucher.getBaccName());      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_MANAGE_CODE)) {        eachRowData.add(cpVoucher.getManageName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_PROJECT_CODE)) {        eachRowData.add(cpVoucher.getProjectCode());        eachRowData.add(cpVoucher.getProjectName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_FUND_CODE)) {        eachRowData.add(cpVoucher.getFundName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_PAYOUT_CODE)) {        eachRowData.add(cpVoucher.getPayoutName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_OUTLAY_CODE)) {        eachRowData.add(cpVoucher.getOutlayCode());        eachRowData.add(cpVoucher.getOutlayName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR1)) {        eachRowData.add(cpVoucher.getDattr1Name());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR2)) {        eachRowData.add(cpVoucher.getDattr2Name());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR3)) {        eachRowData.add(cpVoucher.getDattr3Name());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR4)) {        eachRowData.add(cpVoucher.getDattr4Name());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR5)) {        eachRowData.add(cpVoucher.getDattr5Name());      }      eachRowData.add(cpVoucher.getRemark());      eachRowData.add(cpVoucher.getReceAccName());      eachRowData.add(cpVoucher.getReceBankNodeName());      eachRowData.add(cpVoucher.getReceBankAccCode());      eachRowData.add(cpVoucher.getPayAccName());      eachRowData.add(cpVoucher.getPayBankNodeName());      eachRowData.add(cpVoucher.getPayBankAccCode());      String adjustCode = AsValDataCache.getName("VS_CP_ADJUST", cpVoucher.getCpAdjustCode());      eachRowData.add(adjustCode);      eachRowData.add(cpVoucher.getClearAccCode());      eachRowData.add(cpVoucher.getClearAccName());      eachRowData.add(cpVoucher.getClearAccNo());      eachRowData.add(cpVoucher.getClearBankCode());      eachRowData.add(cpVoucher.getClearBankName());      eachRowData.add(cpVoucher.getClearBankNo());      eachRowData.add(cpVoucher.getBankDate());      String dealState = AsValDataCache.getName("VS_CP_DEAL_STATE", cpVoucher.getDealState());      eachRowData.add(dealState);      eachRowData.add(cpVoucher.getInputorName());      eachRowData.add(cpVoucher.getCdate());      if (false) {        if (bem.isElementInclude(CpElementConstants.FIELD_NAME_CHECK_DATE)) {          eachRowData.add(cpVoucher.getCheckDate());        }        if (bem.isElementInclude(CpElementConstants.FIELD_NAME_CHECK_INPUTOR)) {          eachRowData.add(cpVoucher.getCheckInputor());        }      }      values1.add(eachRowData);    }    Vector values = values1;    cpVoucherTableModel = new MyTableModel(values, names) {      @Override      public Class getColumnClass(int column) {        if ((column >= 0) && (column < getColumnCount()) && this.getRowCount() > 0) {          for (int row = 0; row < this.getRowCount(); row++) {            if (getValueAt(row, column) != null) {              return getValueAt(row, column).getClass();            }          }        }        return Object.class;      }      @Override      public boolean isCellEditable(int row, int colum) {        return false;      }    };    cpVoucherTableModel.setList(cpVoucherList);    return cpVoucherTableModel;  }  public static MyTableModel convertCpVoucherToTableModelForListPage(List cpVoucherList, BillElementMeta bem,  boolean notdisplayBalCol) {    CodeNameHandler.handleNames(cpVoucherList);    MyTableModel cpVoucherTableModel = null;    Vector names = getCpVoucherColumnsForForListPage(bem, notdisplayBalCol, false);    Vector values = getCpVoucherRecordsForForListPage(cpVoucherList, bem, notdisplayBalCol, false);    cpVoucherTableModel = new MyTableModel(values, names) {      @Override      public Class getColumnClass(int column) {        if ((column >= 0) && (column < getColumnCount()) && this.getRowCount() > 0) {          for (int row = 0; row < this.getRowCount(); row++) {            if (getValueAt(row, column) != null) {              return getValueAt(row, column).getClass();            }          }        }        return Object.class;      }      @Override      public boolean isCellEditable(int row, int colum) {        return false;      }    };    cpVoucherTableModel.setList(cpVoucherList);    return cpVoucherTableModel;  }  public static MyTableModel convertCpVoucherToTableModelForAvBiListPage(List cpVoucherList, BillElementMeta bem,  boolean notdisplayBalCol) {    CodeNameHandler.handleNames(cpVoucherList);    MyTableModel cpVoucherTableModel = null;    Vector names = getCpVoucherColumnsForAvBiListPage(bem, notdisplayBalCol, false);    Vector values = getCpVoucherRecordsForAvBiListPage(cpVoucherList, bem, notdisplayBalCol, false);    cpVoucherTableModel = new MyTableModel(values, names) {      @Override      public Class getColumnClass(int column) {        if ((column >= 0) && (column < getColumnCount()) && this.getRowCount() > 0) {          for (int row = 0; row < this.getRowCount(); row++) {            if (getValueAt(row, column) != null) {              return getValueAt(row, column).getClass();            }          }        }        return Object.class;      }      @Override      public boolean isCellEditable(int row, int colum) {        return false;      }    };    cpVoucherTableModel.setList(cpVoucherList);    return cpVoucherTableModel;  }  public static Vector getCpVoucherRecordsForAvBiListPage(List cpVoucherList, BillElementMeta bem,  boolean notdisplayBalCol, boolean isShowCheckin) {    CodeNameHandler.handleNames(cpVoucherList);    Vector values = new Vector();    for (int i = 0; i < cpVoucherList.size(); i++) {      Vector eachRowData = new Vector();      CpVoucher cpVoucher = (CpVoucher) cpVoucherList.get(i);      eachRowData.add(cpVoucher.getCpVouNo());      eachRowData.add(format.format(cpVoucher.getProcdate()));      eachRowData.add(cpVoucher.getClearDate() == null ? null : format.format(cpVoucher.getClearDate()));      if (!notdisplayBalCol) {        eachRowData.add(cpVoucher.getBiMoney());        eachRowData.add(cpVoucher.getBiBalance());        eachRowData.add(cpVoucher.getBiPaySum());      }      eachRowData.add(cpVoucher.getOrgMoney());      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_BAL_MODE_CODE)) {        eachRowData.add(cpVoucher.getBalModeName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_CHECK_NO)) {        eachRowData.add(cpVoucher.getCheckNo());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_CONTRACT_CODE)) {        eachRowData.add(cpVoucher.getContractCode());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_INCEPTDOC_CODE)) {        eachRowData.add(cpVoucher.getInceptDocName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_SENDDOC_CODE)) {        eachRowData.add(cpVoucher.getSendDocName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_OPERATION_TYPE_CODE)) {        eachRowData.add(cpVoucher.getOperationTypeName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_ORG_CODE)) {        eachRowData.add(cpVoucher.getOrgName());      }      eachRowData.add(cpVoucher.getCoCode());      eachRowData.add(cpVoucher.getCoName());      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_ORIGIN_CODE)) {        eachRowData.add(cpVoucher.getOriginName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_PAYTYPE_CODE)) {        eachRowData.add(cpVoucher.getPaytypeName());      }      eachRowData.add(cpVoucher.getBaccCode());      eachRowData.add(cpVoucher.getBaccName());      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_MANAGE_CODE)) {        eachRowData.add(cpVoucher.getManageName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_PROJECT_CODE)) {        eachRowData.add(cpVoucher.getProjectCode());        eachRowData.add(cpVoucher.getProjectName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_FUND_CODE)) {        eachRowData.add(cpVoucher.getFundName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_PAYOUT_CODE)) {        eachRowData.add(cpVoucher.getPayoutName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_OUTLAY_CODE)) {        eachRowData.add(cpVoucher.getOutlayCode());        eachRowData.add(cpVoucher.getOutlayName());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR1)) {        eachRowData.add(cpVoucher.getDattr1Name());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR2)) {        eachRowData.add(cpVoucher.getDattr2Name());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR3)) {        eachRowData.add(cpVoucher.getDattr3Name());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR4)) {        eachRowData.add(cpVoucher.getDattr4Name());      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR5)) {        eachRowData.add(cpVoucher.getDattr5Name());      }      eachRowData.add(cpVoucher.getRemark());      eachRowData.add(cpVoucher.getReceAccName());      eachRowData.add(cpVoucher.getReceBankNodeName());      eachRowData.add(cpVoucher.getReceBankAccCode());      eachRowData.add(cpVoucher.getPayAccName());      eachRowData.add(cpVoucher.getPayBankNodeName());      eachRowData.add(cpVoucher.getPayBankAccCode());      String adjustCode = AsValDataCache.getName("VS_CP_ADJUST", cpVoucher.getCpAdjustCode());      eachRowData.add(adjustCode);      eachRowData.add(cpVoucher.getClearAccCode());      eachRowData.add(cpVoucher.getClearAccName());      eachRowData.add(cpVoucher.getClearAccNo());      eachRowData.add(cpVoucher.getClearBankCode());      eachRowData.add(cpVoucher.getClearBankName());      eachRowData.add(cpVoucher.getClearBankNo());      eachRowData.add(cpVoucher.getBankDate());      String dealState = AsValDataCache.getName("VS_CP_DEAL_STATE", cpVoucher.getDealState());      eachRowData.add(dealState);      eachRowData.add(cpVoucher.getInputorName());      eachRowData.add(cpVoucher.getCdate());      if (isShowCheckin) {        if (bem.isElementInclude(CpElementConstants.FIELD_NAME_CHECK_DATE)) {          eachRowData.add(cpVoucher.getCheckDate());        }        if (bem.isElementInclude(CpElementConstants.FIELD_NAME_CHECK_INPUTOR)) {          eachRowData.add(cpVoucher.getCheckInputor());        }      }      values.add(eachRowData);    }    return values;  }  public static Vector getCpVoucherColumnsForAvBiListPage(BillElementMeta bem, boolean notdisplayBalCol, boolean isShowCheckin) {    Vector names = new Vector();    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_VOU_NO));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PROC_DATE));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CLEAR_DATE));    if (!notdisplayBalCol) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_BI_MONEY));      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_BI_BALANCE));      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_BI_PAYSUM));    }    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_ORG_MONEY));    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_BAL_MODE_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_BAL_MODE_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_CHECK_NO)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CHECK_NO));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_CONTRACT_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CONTRACT_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_INCEPTDOC_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_INCEPTDOC_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_SENDDOC_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_SENDDOC_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_OPERATION_TYPE_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_OPERATION_TYPE_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_ORG_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_ORG_NAME));    }    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CO_CODE));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CO_NAME));    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_ORIGIN_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_ORIGIN_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_PAYTYPE_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PAYTYPE_NAME));    }    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_B_ACC_CODE));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_B_ACC_NAME));    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_MANAGE_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_MANAGE_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_PROJECT_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PROJECT_CODE));      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PROJECT_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_FUND_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_FUND_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_PAYOUT_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PAYOUT_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_OUTLAY_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_OUTLAY_CODE));      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_OUTLAY_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR1)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_D_ATTR1_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR2)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_D_ATTR2_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR3)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_D_ATTR3_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR4)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_D_ATTR4_NAME));    }    if (bem.isElementInclude(CpElementConstants.FIELD_NAME_D_ATTR5)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_D_ATTR5_NAME));    }    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_REMARK));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_RECE_ACCNAME));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_RECE_BANKNODENAME));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_RECE_BANKACCCODE));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PAY_ACCNAME));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PAY_BANKNODENAME));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PAY_BANKACCCODE));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CP_ADJUST_CODE));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CLEAR_ACC_CODE));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CLEAR_ACC_NAME));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CLEAR_ACC_NO));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CLEAR_BANK_CODE));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CLEAR_BANK_NAME));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CLEAR_BANK_NO));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_BANK_DATE));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_DEAL_STATE));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_INPUTOR_NAME));    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CDATE));    if (isShowCheckin) {      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_CHECK_DATE)) {        names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CHECK_DATE));      }      if (bem.isElementInclude(CpElementConstants.FIELD_NAME_CHECK_INPUTOR)) {        names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CHECK_INPUTOR));      }    }    return names;  }  public static MyTableModel convertCpVoucherToTableModelForCpDvtListPage(List cpVoucherList, BillElementMeta bem,  boolean notdisplayBalCol) {    CodeNameHandler.handleNames(cpVoucherList);    MyTableModel cpVoucherTableModel = null;    Vector names = getCpVoucherColumnsForForListPage(bem, notdisplayBalCol, true);    Vector values = getCpVoucherRecordsForForListPage(cpVoucherList, bem, notdisplayBalCol, true);    cpVoucherTableModel = new MyTableModel(values, names) {      @Override      public Class getColumnClass(int column) {        if ((column >= 0) && (column < getColumnCount()) && this.getRowCount() > 0) {          for (int row = 0; row < this.getRowCount(); row++) {            if (getValueAt(row, column) != null) {              return getValueAt(row, column).getClass();            }          }        }        return Object.class;      }      @Override      public boolean isCellEditable(int row, int colum) {        return false;      }    };    cpVoucherTableModel.setList(cpVoucherList);    return cpVoucherTableModel;  }  public static MyTableModel convertCpAvSummedToTableModelForListPage(List cpVoucherList, String billTypeCode,  String sumElementTypeCode, boolean notdisplayBalCol) {    BillElementMeta bem = BillElementMeta.getBillElementMeta(billTypeCode);    TzdSumElementMeta sumBem = TzdSumElementMeta.getBillElementMeta(sumElementTypeCode);    CodeNameHandler.handleNames(cpVoucherList);    MyTableModel cpVoucherTableModel = null;    Vector names = getCpAvSummedColumnsForForListPage(bem, sumBem, notdisplayBalCol);    Vector values = getCpAvSummedRecordsForForListPage(cpVoucherList, bem, sumBem, notdisplayBalCol);    cpVoucherTableModel = new MyTableModel(values, names) {      @Override      public Class getColumnClass(int column) {        if ((column >= 0) && (column < getColumnCount()) && this.getRowCount() > 0) {          for (int row = 0; row < this.getRowCount(); row++) {            if (getValueAt(row, column) != null) {              return getValueAt(row, column).getClass();            }          }        }        return Object.class;      }      @Override      public boolean isCellEditable(int row, int colum) {        return false;      }    };    cpVoucherTableModel.setList(cpVoucherList);    return cpVoucherTableModel;  }  public static MyTableModel convertCpVoucherUnSummedToTableModelForListPage(List cpVoucherList, String billTypeCode,  boolean notdisplayBalCol) {    BillElementMeta bem = BillElementMeta.getBillElementMeta(billTypeCode);    CodeNameHandler.handleNames(cpVoucherList);    MyTableModel cpVoucherTableModel = null;    Vector names = getCpVoucherUnSummedColumnsForForListPage(bem, notdisplayBalCol);    Vector values = getCpVoucherUnSummedRecordsForForListPage(cpVoucherList, bem, notdisplayBalCol);    cpVoucherTableModel = new MyTableModel(values, names) {      @Override      public Class getColumnClass(int column) {        if ((column >= 0) && (column < getColumnCount()) && this.getRowCount() > 0) {          for (int row = 0; row < this.getRowCount(); row++) {            if (getValueAt(row, column) != null) {              return getValueAt(row, column).getClass();            }          }        }        return Object.class;      }      @Override      public boolean isCellEditable(int row, int colum) {        return false;      }    };    cpVoucherTableModel.setList(cpVoucherList);    return cpVoucherTableModel;  }  public static MyTableModel convertCpVoucherSumToTableModelForListPage(List cpVoucherList, BillElementMeta bem,  TzdSumElementMeta sumBem, boolean notdisplayBalCol, boolean notdisplayBankInfo) {    CodeNameHandler.handleNames(cpVoucherList);    MyTableModel cpVoucherTableModel = null;    Vector names = getCpVoucherSumColumnsForForListPage(bem, sumBem, notdisplayBalCol, notdisplayBankInfo);    Vector values = getCpVoucherSumRecordsForForListPage(cpVoucherList, bem, sumBem, notdisplayBalCol, notdisplayBankInfo);    cpVoucherTableModel = new MyTableModel(values, names) {      @Override      public Class getColumnClass(int column) {        if ((column >= 0) && (column < getColumnCount()) && this.getRowCount() > 0) {          for (int row = 0; row < this.getRowCount(); row++) {            if (getValueAt(row, column) != null) {              return getValueAt(row, column).getClass();            }          }        }        return Object.class;      }      @Override      public boolean isCellEditable(int row, int colum) {        return false;      }    };    cpVoucherTableModel.setList(cpVoucherList);    return cpVoucherTableModel;  }  public static MyTableModel convertCpVoucherToTableModelForListPage(List cpVoucherList, String billTypeCode,  boolean notdisplayBalCol) {    BillElementMeta bem = BillElementMeta.getBillElementMeta(billTypeCode);    return convertCpVoucherToTableModelForListPage(cpVoucherList, bem, notdisplayBalCol);  }  public static MyTableModel convertCpVoucherSumToTableModelForListPage(List cpVoucherList,  String billTypeCode, String sumElementCode,  boolean notdisplayBalCol, boolean notdisplayBankInfo) {    BillElementMeta bem = BillElementMeta.getBillElementMeta(billTypeCode);    TzdSumElementMeta sumBem = TzdSumElementMeta.getBillElementMeta(sumElementCode);    return convertCpVoucherSumToTableModelForListPage(cpVoucherList, bem, sumBem, notdisplayBalCol, notdisplayBankInfo);  }  /*   * 凭证数据编辑界面   */  public static DefaultTableModel convertCpVoucherToTableModelForEditPage(List cpVoucherList,  BillElementMeta bem) {    CodeNameHandler.handleNames(cpVoucherList);    DefaultTableModel busiBillTableModel = null;    Vector names = new Vector();    Vector values = new Vector();    names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_VOU_NO));    if (bem.isElementDisplayField(CpElementConstants.FIELD_NAME_INCEPTDOC_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_INCEPTDOC_NAME));    }    if (bem.isElementDisplayField(CpElementConstants.FIELD_NAME_SENDDOC_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_SENDDOC_NAME));    }    if (bem.isElementDisplayField(CpElementConstants.FIELD_NAME_ORG_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_ORG_NAME));    }    if (bem.isElementDisplayField(CpElementConstants.FIELD_NAME_CO_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CO_CODE));      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_CO_NAME));    }    if (bem.isElementDisplayField(CpElementConstants.FIELD_NAME_ORIGIN_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_ORIGIN_NAME));    }    if (bem.isElementDisplayField(CpElementConstants.FIELD_NAME_PAYTYPE_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PAYTYPE_NAME));    }    if (bem.isElementDisplayField(CpElementConstants.FIELD_NAME_B_ACC_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_B_ACC_CODE));      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_B_ACC_NAME));    }    if (bem.isElementDisplayField(CpElementConstants.FIELD_NAME_MANAGE_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_MANAGE_NAME));    }    if (bem.isElementDisplayField(CpElementConstants.FIELD_NAME_PROJECT_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PROJECT_NAME));    }    if (bem.isElementDisplayField(CpElementConstants.FIELD_NAME_FUND_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_FUND_NAME));    }    if (bem.isElementDisplayField(CpElementConstants.FIELD_NAME_PAYOUT_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_PAYOUT_NAME));    }    if (bem.isElementDisplayField(CpElementConstants.FIELD_NAME_OUTLAY_CODE)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_OUTLAY_CODE));      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_OUTLAY_NAME));    }    if (bem.isElementDisplayField(CpElementConstants.FIELD_NAME_D_ATTR1)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_D_ATTR1_NAME));    }    if (bem.isElementDisplayField(CpElementConstants.FIELD_NAME_D_ATTR2)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_D_ATTR2_NAME));    }    if (bem.isElementDisplayField(CpElementConstants.FIELD_NAME_D_ATTR3)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_D_ATTR3_NAME));    }    if (bem.isElementDisplayField(CpElementConstants.FIELD_NAME_D_ATTR4)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_D_ATTR4_NAME));    }    if (bem.isElementDisplayField(CpElementConstants.FIELD_NAME_D_ATTR5)) {      names.add(LangTransMeta.translate(CpElementConstants.FIELD_TRANS_D_ATTR5_NAME));    }    for (int i = 0, j = cpVoucherList.size(); i < j; i++) {      CpVoucher cpVoucher = (CpVoucher) cpVoucherList.get(i);      Vector eachRowData = new Vector();      eachRowData.add(cpVoucher.getCpVouNo());      if (bem.isElementDisplayField(DpElementConstants.FIELD_NAME_INCEPTDOC_CODE)) {        eachRowData.add(cpVoucher.getInceptDocName());      }      if (bem.isElementDisplayField(DpElementConstants.FIELD_NAME_SENDDOC_CODE)) {        eachRowData.add(cpVoucher.getSendDocCode());      }      if (bem.isElementDisplayField(DpElementConstants.FIELD_NAME_ORG_CODE)) {        eachRowData.add(cpVoucher.getOrgName());      }      if (bem.isElementDisplayField(CpElementConstants.FIELD_NAME_CO_CODE)) {        eachRowData.add(cpVoucher.getCoCode());        eachRowData.add(cpVoucher.getCoName());      }      if (bem.isElementDisplayField(DpElementConstants.FIELD_NAME_ORIGIN_CODE)) {        eachRowData.add(cpVoucher.getOriginName());      }      if (bem.isElementDisplayField(CpElementConstants.FIELD_NAME_PAYTYPE_CODE)) {        eachRowData.add(cpVoucher.getPaytypeName());      }      if (bem.isElementDisplayField(CpElementConstants.FIELD_NAME_B_ACC_CODE)) {        eachRowData.add(cpVoucher.getBaccCode());        eachRowData.add(cpVoucher.getBaccName());      }      if (bem.isElementDisplayField(DpElementConstants.FIELD_NAME_MANAGE_CODE)) {        eachRowData.add(cpVoucher.getManageName());      }      if (bem.isElementDisplayField(DpElementConstants.FIELD_NAME_PROJECT_CODE)) {        eachRowData.add(cpVoucher.getProjectName());      }      if (bem.isElementDisplayField(CpElementConstants.FIELD_NAME_FUND_CODE)) {        eachRowData.add(cpVoucher.getFundName());      }      if (bem.isElementDisplayField(DpElementConstants.FIELD_NAME_PAYOUT_CODE)) {        eachRowData.add(cpVoucher.getPayoutName());      }      if (bem.isElementDisplayField(DpElementConstants.FIELD_NAME_OUTLAY_CODE)) {        eachRowData.add(cpVoucher.getOutlayCode());        eachRowData.add(cpVoucher.getOutlayName());      }      if (bem.isElementDisplayField(DpElementConstants.FIELD_NAME_D_ATTR1)) {        eachRowData.add(cpVoucher.getDattr1Name());      }      if (bem.isElementDisplayField(DpElementConstants.FIELD_NAME_D_ATTR2)) {        eachRowData.add(cpVoucher.getDattr2Name());      }      if (bem.isElementDisplayField(DpElementConstants.FIELD_NAME_D_ATTR3)) {        eachRowData.add(cpVoucher.getDattr3Name());      }      if (bem.isElementDisplayField(DpElementConstants.FIELD_NAME_D_ATTR4)) {        eachRowData.add(cpVoucher.getDattr4Name());      }      if (bem.isElementDisplayField(DpElementConstants.FIELD_NAME_D_ATTR5)) {        eachRowData.add(cpVoucher.getDattr5Name());      }      values.add(eachRowData);    }    busiBillTableModel = new DefaultTableModel(values, names) {      @Override      public Class getColumnClass(int column) {        if ((column >= 0) && (column < getColumnCount()) && this.getRowCount() > 0) {          for (int row = 0; row < this.getRowCount(); row++) {            if (getValueAt(row, column) != null) {              return getValueAt(row, column).getClass();            }          }        }        return Object.class;      }      @Override      public boolean isCellEditable(int row, int colum) {        return false;      }    };    return busiBillTableModel;  }}